#ifndef DYN_TARGET_ITEM_SET_PRIVATE_H
#define DYN_TARGET_ITEM_SET_PRIVATE_H
#include "DynamicEntity.h"
#include "DynTargetManagerPrivate.h"

class DynTargetItemSetPrivate : public DynTargetItemSet,public INamedObject
{
public:
	DynTargetItemSetPrivate(const QString& name = QString(),DynTargetManagerPrivate* mgrPrivate = nullptr);
	~DynTargetItemSetPrivate();
public:
	QString getName()const { return setName; }
	QString getObjectName()const { return "DynTargetItemSet"; }

	bool addDynTargetItem(DynTargetItem* item);

	DynTargetItem* createDynTargetItem(const QString& group,const QString& name,const QString& nation,const QString& target);

	DynTargetItem* getDynTargetItemByName(const QString& name) const;
	DynTargetItem* getDynTargetItem(const QString& id) const;
	QList<DynTargetItem*> getDynTargetListByGroup(const QString& group);

	DynTargetItem* getDynTargetItemByIndex(int index);
	int getDynTargetCount() const;

	bool removeDynTargetItem(DynTargetItem* item);
	void clearTargets();

	QList<DynTargetItem*> isDynTargetItemEx(int x,int y);

	DynTargetItem* isTrackPoint(int x,int y,int* index = nullptr);
public:
	void setGroupVisible(const QString& group,bool visible);
	bool getGroupVisible(const QString& group);
	bool removeGroup(const QString& group);
	QStringList getAllGroups();
private:
	QString setName;
	DynTargetManagerPrivate* mgr = nullptr;
	QList<DynTargetItem*> targetItems;
};

#endif